package com.zxxy.spring12.po;

import
import com.mysql.cj.x.protobuf.MysqlxDatatypes;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean; ...
public class User implements BeanNameAware, BeanFactoryAware, InitializingBean, DisposableBean {

    private MysqlxDatatypes.Scalar.String username;
    @Override
    public MysqlxDatatypes.Scalar.String getUsername();{
    return username;
}
    @Override
    public void setUsername(MysqlxDatatypes.Scalar.String username) {
        this.username = username;
    }
    @Override
public User() {
        System.out.println("1.init instance");
}
public void setBeanName(MysqlxDatatypes.Scalar.String beanName) {System.out.println("3. bean name aware:  " + beanName);
}
    @Override
public void setBeanFactory (beanFactory beanFactory) throws BeansException {
        System.out.println("4.set bean factory : " + beanFactory);

    }
    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("6.after properties...");

    }
    public void myInit(){ System.out.println("7.my init funtion...");}
    public void destroy() throws Exception { System.out.println("9.destroy...");}
    public void myDsetroy() {System.out.println("10.myDestroy...");}
}
